import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
df=pd.read_csv('tips.csv')
print(df.head())
#estimator:条形图的柱子计算方式
#黑线：置信区间
#ci：修改置信区间
sns.barplot(estimator=np.min,x='time',y='tip',data=df,hue='sex')
plt.show()
sns.barplot(estimator=np.max,x='time',y='tip',data=df,hue='sex')
plt.show()
sns.barplot(estimator=np.mean,x='time',y='tip',data=df,hue='sex')
plt.show()
sns.barplot(estimator=np.median,x='time',y='tip',data=df,hue='sex')
plt.show()